package com.brsya.movie.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.FrameLayout;

import androidx.fragment.app.FragmentTransaction;

import com.brsya.base.base.BaseLayoutActivity;
import com.brsya.movie.R;
import com.brsya.movie.fragment.BookListFragment;

/**
 * Created by Brsya
 * CreateDate: 2022/8/2  8:52
 * Description:
 * 书架页面
 */
public class BookListActivity extends BaseLayoutActivity {


    private FrameLayout flHomeFragmentBox;

    private BookListFragment bookListFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fragment_box);
        initView();
    }

    private void initView() {

        flHomeFragmentBox = findViewById(R.id.fl_home_fragment_box);

        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
        ft.add(R.id.fl_home_fragment_box, bookListFragment = BookListFragment.newInstance());
        ft.commit();

        bookListFragment.setOnBackClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

}
